package com.jscm.openmodule;

import com.App;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;

/**
 * 模块地址窗口
 */
public class OpenModuleWindow {
    public static Stage stage = new Stage();
    static {
        init();
    }
    private static void init() {
        stage.initOwner(App.stage);
        stage.initModality(Modality.WINDOW_MODAL);
        stage.setAlwaysOnTop(true);
        stage.setResizable(false);
        stage.setTitle("查看模块地址"+ "     双击复制模块地址");
        stage.setWidth(800);
        stage.setHeight(500);
        stage.hide();
        stage.setScene(new Scene(OpenModuleShow.pane));
        stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
            @Override
            public void handle(WindowEvent event) {
                stage.hide();
            }
        });
    }
}
